<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    
</head>
<body>
    <!-- <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.1/vue.common.dev.js"></script> -->
    <div id="app">
        <input type="text" v-model="school.name">
        <div>{{school.name}}</div>
        <div>{{school.slogan}}</div>
        {{getNewName}}
        <button v-on:click="change">更新操作</button>
        <div v-text="message"></div>
    </div>
    <script src="./MVVM.js"></script>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{
                school:{
                    name:"振涛",
                    slogan: "优秀是可以塑造的",
                },
                message:'<h1>欢迎各位</h1>'
            },
            computed:{
                getNewName(){
                    return '文本框：' + this.school.name
                }
            },
            methods:{
                change(){
                    this.school.name = "此次操作未更新操作"
                }
            }
        })
    </script>
</body>
</html>
